﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Yuans.BinaryConfig.OperationBoardControl
{
    public partial class BoolItemOperationBoard : UserControl
    {
        private bool mTrueOrFalse;

        public bool TrueOrFalse
        {
            get { return mTrueOrFalse; }
            set
            {
                mTrueOrFalse = value;
                boolSelectComboBox.SelectedIndex = mTrueOrFalse ? 1 : 0;
            }
        }
        public BoolItemOperationBoard()
        {
            InitializeComponent();
            mTrueOrFalse = false;
        }

        private void boolSelectComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            mTrueOrFalse = (((ComboBox)sender).SelectedIndex > 0) ? true : false;
        }
    }
}
